package com.csyf.manager.exception;

import com.csyf.manager.channel.base.BaseReturn;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.NotReadablePropertyException;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;

/**
 * @Author: Enzo
 * @Date: 2018/4/11 18:04
 */
@Slf4j
@ControllerAdvice
public class ExceptionAdvice {

    @ResponseBody
    @ExceptionHandler()
    public BaseReturn handleException(HttpServletRequest request,Exception e) throws Exception{
        log.info("请求方式错误");
        return new BaseReturn();
    }
}
